package com.vehicle.controller;


import com.vehicle.service.UserLogService;
import com.vehicle.vo.ResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 校园车辆管理系统
 * @since 2023-05-17
 */
@RestController
@RequestMapping("/user-log")
public class UserLogController {

    @Autowired
    UserLogService userLogService;


    //登录日志
    @GetMapping("/loginList/{page}/{size}")
    public ResultVO getLoginList(@PathVariable("page") String page, @PathVariable("size") String size){
        return ResultVO.succ(userLogService.getLoginList(Integer.parseInt(page),Integer.parseInt(size)));
    }

    //操作日志
    @GetMapping("/operationList/{page}/{size}")
    public ResultVO getOperationList(@PathVariable("page") String page, @PathVariable("size") String size){
        return ResultVO.succ(userLogService.getOperationList(Integer.parseInt(page),Integer.parseInt(size)));
    }

}

